<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<!-- saved from url=(0058)http://cncsaoviet.dyndns.info/PMNhanSu/Common/EmpList.aspx -->
<html xmlns="http://www.w3.org/1999/xhtml"><head id="Head1"><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><title>

</title></head>
<body style="margin-left:5px;margin-right:0px;margin-top:0px">
    <form name="form1" method="post" action="EmpList.htm" id="form1">
<div>
<input type="hidden" name="__VIEWSTATE" id="__VIEWSTATE" value="/wEPDwUKLTI3NTMwMzM4OA9kFgICAw9kFgICAQ9kFgJmD2QWCAIDDw8WAh4EVGV4dAUeUE0gU0FPIFZJ4buGVCAtIFBow7JuZyBz4buRIDEwZGQCCw8PFgIeB0VuYWJsZWRoZGQCDw8PFgIfAAUCLzFkZAIRDw8WAh8BaGRkZA==">
</div>
            
     <div class="EmpList" style="width:100%;height:100px;"> 
           
 <link href="general.css" rel="stylesheet" type="text/css">
    <link href="myStyles.css" rel="stylesheet" type="text/css">
    <script language="javascript" src="common(1).js" type="text/javascript"></script>
    <script type="text/javascript" src="jquery.min.js"></script>  
    <script src="jquery.autocomplete.js" type="text/javascript"></script>

      <script type="text/javascript">
          function setEmpInfo(EmpID) {
              setCookie("EmpID", EmpID);
              //ctl00_ContentPlaceHolder1
              
              //alert(parent.document.getElementById('mainFrame').contentWindow.document.getElementById("ctl00_ContentPlaceHolder1_btnView").id);
              //parent.document.getElementById('mainFrame').contentWindow.document.getElementById("ctl00_ContentPlaceHolder1_btnView").click();
              //chu y trong trang phai co 1 button view btnView
             
              var obj = getParentObjectiframe('mainFrame', 'ctl00_ContentPlaceHolder1_btnView');

              if (obj != null) {
                  var Browser = navigator.userAgent;
                  var CheckAccName = "";
                  var CheckEmail = "";
                  if (Browser.indexOf('Firefox') >= 0) {
                      obj.click();
                  }
                  else {

                      LinkClick(obj);
                  }
              }
              else {
                  //man hinh danh gia ko dung masterpage
                  obj = getParentObjectiframe('mainFrame', 'btnView');
                  if (obj != null)
                      LinkClick(obj);
              }
              var LK = parent.document.getElementById("toTopHover");
              fireEvent(LK, 'click');
          }


          function fireEvent(obj, evt) {
              var fireOnThis = obj;
              if (document.createEvent) {
                  var evObj = document.createEvent('MouseEvents');
                  evObj.initEvent(evt, true, false);
                  fireOnThis.dispatchEvent(evObj);
              } else if (document.createEventObject) {
                  fireOnThis.fireEvent('on' + evt);
              }
          }
    </script>

  <script type="text/javascript">
           $(document).ready(function () {
               $("#EmpList1_txtEmpName").autocomplete('../Common/Search_CS.ashx');
           });
    </script> 

            
    <script type="text/javascript">
        <!--
        $(document).ready(function () {
            $(".inputextSearch").focus(function (srcc) {
                if ($(this).val() == $(this)[0].title) {
                    $(this).removeClass("inputextSearchActive");
                    $(this).val("");
                }
            });
            $(".inputextSearch").blur(function () {
                if ($(this).val() == "") {
                    $(this).addClass("inputextSearchActive");
                    $(this).val($(this)[0].title);
                }
            });
            $(".inputextSearch").blur();
        });
        //-->
</script>
<div id="EmpList1_divEmplist" class="bogoc_table">
     <table style="width:100%" cellpadding="0" cellspacing="0" border="0"> 
        <tbody><tr>
            <td>
                <div class="EmpListTextSearch">
                    <a href="javascript: ShowPopup("DepartmentTree.aspx");" id="A1" title="Click chon phong ban">
                        <img alt="Click chon phong ban" src="binary-tree-icon.png"></a>  
                    <a href="javascript: ShowPopup("../Common/DepartmentTree.aspx");" id="depart">Chọn phòng ban</a>  
                              
                </div>
            </td>
        </tr>
        <tr>
        
            <td>    
                <span id="EmpList1_Label1" style="color: #515B65; font-weight: 700; font-size: 12px;">Phòng ban:</span>           
                <span id="EmpList1_lblDept" style="color: #515B65; font-weight: 700; font-size: 14px;">PM SAO VIỆT - Phòng số 10</span>    
            </td>              
        </tr>
        <tr> <td>    
                <input name="EmpList1$txtEmpName" type="text" id="EmpList1_txtEmpName" class="inputextSearch ac_input inputextSearchActive" title="Tìm kiếm nhân viên" onkeyup="javascript:FilterEmpName(event)" style="width:90%;" autocomplete="off">
            </td>              
        </tr>
        <tr>
        <td>
        
          <table style="width:100%" cellpadding="5" cellspacing="0" id="tblList" border="0"> 
          
                                  
                   
                                 
                    <tbody><tr>
                      <td align="left" valign="top">                                                                                                   
                           <a target="detailFrame" onclick="setEmpInfo(&quot;HO1071200112&quot;)">0002 - TRẦN MINH CHƯƠNG</a>                                                  
                      </td>
                      <td style="display:none">
                           0002 - TRẦN MINH CHƯƠNG
                      </td>
                    </tr>
                    
                  
                    <tr>
                      <td align="left" valign="top" style="background-color:#DFE2E6;">                                                                                                   
                           <a target="detailFrame" onclick="setEmpInfo(&quot;HO2071100116&quot;)">NV0032 - Trần Ngọc Phú</a>                                               
                      </td>
                      <td style="display:none; background-color:#DFE2E6">
                           NV0032 - Trần Ngọc Phú
                      </td>
                    </tr>        
                                                                    
                
             
             </tbody></table>
             
            </td>
        </tr> 
        <tr valign="middle">
        <td>
            <input name="EmpList1$txtRowOfPage" type="text" value="300" id="EmpList1_txtRowOfPage" class="txtPaging" title="Số hàng ủa trang" style="width:25px;">    
            <input type="submit" name="EmpList1$cmdPrev" value="&lt;&lt;" id="EmpList1_cmdPrev" disabled="disabled">   
            <input name="EmpList1$txtPageNumber" type="text" value="1" id="EmpList1_txtPageNumber" class="txtPaging" title="Trang" style="width:20px;"> 
                <span id="EmpList1_lblCurrentPage">/1</span> 

                <input type="submit" name="EmpList1$cmdNext" value="&gt;&gt;" id="EmpList1_cmdNext" disabled="disabled"> 
                &nbsp;<input type="submit" name="EmpList1$btnView" value="" id="EmpList1_btnView" class="btnRefresh-mn" style="height:22px;width:22px;">      
        </td>              
        </tr>
        <tr style="display:none;">
        <td>
            <input name="EmpList1$txtLSLevel1ID" type="text" value="GD" id="EmpList1_txtLSLevel1ID">
            <input name="EmpList1$txtLSLevel2ID" type="text" id="EmpList1_txtLSLevel2ID">
             <input name="EmpList1$txtLSLevel3ID" type="text" id="EmpList1_txtLSLevel3ID">
              <input name="EmpList1$txtLSCompanyID" type="text" value="HO1" id="EmpList1_txtLSCompanyID">
              <input name="EmpList1$txtDepartmentName" type="text" id="EmpList1_txtDepartmentName">
        </td>
    </tr>
        </tbody></table>   
                     
</div>
     <script language="javascript" type="text/javascript">
         SetLanguage();
         function SetLanguage() {
             //        alert(document.getElementById("cboLanguage").value);
            
             if (getCookie('LangID') == "EN") {
                 document.getElementById("depart").innerHTML = 'Select department';
                 document.getElementById("EmpList1_Label1").innerHTML = 'Department:';
                 document.getElementById("EmpList1_txtEmpName").title = 'Search employee';
             } else {
                 document.getElementById("depart").innerHTML = 'Chọn phòng ban';
                 document.getElementById("EmpList1_Label1").innerHTML = 'Phòng ban:';
                 document.getElementById("EmpList1_txtEmpName").title='Tìm kiếm nhân viên';
                
             }
         }

         function ShowPopup(link) {
             window.open(link, "", "resizable: yes;dialogWidth: 750px;dialogHeight: 500px");
         }


         function ReturnPopUpHeaderSearch(strDeptName) {

             var CompanyID = getCookie("CompanyID");
             document.getElementById('EmpList1_txtLSCompanyID').value = '';
             if (CompanyID != null) document.getElementById('EmpList1_txtLSCompanyID').value = CompanyID;
             var Level1 = getCookie("Level1ID");
             document.getElementById('EmpList1_txtLSLevel1ID').value = '';
             if (Level1 != null) document.getElementById('EmpList1_txtLSLevel1ID').value = Level1;
             var Level2 = getCookie("Level2ID");
             document.getElementById('EmpList1_txtLSLevel2ID').value = '';
             if (Level2 != null) document.getElementById('EmpList1_txtLSLevel2ID').value = Level2;
             var Level3 = getCookie("Level2ID");
             document.getElementById('EmpList1_txtLSLevel3ID').value = '';
             if (Level3 != null) document.getElementById('EmpList1_txtLSLevel3ID').value = Level3;

             document.getElementById('EmpList1_lblDept').innerHTML = strDeptName; // getCookie("DepartmentName");
             document.getElementById('EmpList1_txtDepartmentName').value = strDeptName; // getCookie("DepartmentName");
             setCookie("DepartmentName", strDeptName);

             // location.reload(true);

             //goi buuton view de load lai gia tri theo phong ban moi chon
             //buuton view nam trong dang detail
             //        var object = document.getElementById('btnAddScanTime');
             //        if (object != null) {
             //            LinkClick(object);
             //        }

             //trang chua ascx nay fai co funtion nay de goi lai nut xem neu muon
             //check neu trang chinh co funtion ReturnPopUp thi moi goi
             if (typeof ReturnPopUp == 'function') {
                 ReturnPopUp();
             }
         }

         function ReturnPopUp() {
             LinkClick(document.getElementById("EmpList1_btnView")); //'EmpList1_btnView'));
         }

         function FilterEmpName(e) {
             //return;
             var strEmpName = "";
             var keynum = "";
             var keychar = "";
             var numcheck = /\d/;
             if (window.event) // IE
             {
                 keynum = e.keyCode;
             }
             else if (e.which) // Netscape/Firefox/Opera
             {
                 keynum = e.which;
             }
             keychar = String.fromCharCode(keynum);
             if (numcheck.test(keychar) == true) {
                 ShowEmpsWithName("");
                 return;
             }
             //Filter
             var txtEmpName = document.getElementById("EmpList1_txtEmpName");
             strEmpName = txtEmpName.value;
             ShowEmpsWithName(strEmpName);
         }

         function ShowEmpsWithName(strEmpName) {



             if (strEmpName == "")
                 strEmpName = document.getElementById("EmpList1_txtEmpName").value;
             var GridName = "tblList";
             var BeginIndex = 0;
             var EndIndexExt = 0;
             var count = 0;
             var focusIndex = 0;
             var theTable = document.getElementById(GridName);
             if (theTable.rows.length > 1) {
                 HiddenAllRows("none"); //hidden all records on grid
                 var empName = "";
                 strEmpName = locdau(strEmpName);

                 for (var i = BeginIndex; i < theTable.rows.length + EndIndexExt; i++) {


                     empName = theTable.rows[i].cells[1].innerHTML;
                     empName = locdau(empName);


                     
                     //alert("lastIndexOf :"+empCode.lastIndexOf(strEmpCode, empCode.length - 1) + ",strEmpCode : " +strEmpCode);

                     if (empName.lastIndexOf(strEmpName, empName.length - 1) > -1) {
                         count++;
                         focusIndex = i;
                         theTable.rows[i].style.display = "block";
                     }
                 } //end for loop 
             }
         }

         function HiddenAllRows(activity) {
             //alert("Hidden");
             activity = activity == "" ? "none" : activity;
             var theTable = document.getElementById("tblList");
             var BeginIndex = 0;
             var EndIndexExt = 0;
             if (theTable == null) return;
             if (theTable.rows.length > 1) {
                 for (var i = BeginIndex; i < theTable.rows.length + EndIndexExt; i++) {
                     theTable.rows[i].style.display = activity;
                 }
             }
         }

         function locdau(str) {
             str = str.toLowerCase();
             str = str.replace(/à|á|ạ|ả|ã|â|ầ|ấ|ậ|ẩ|ẫ|ă|ằ|ắ|ặ|ẳ|ẵ/g, "a");
             str = str.replace(/è|é|ẹ|ẻ|ẽ|ê|ề|ế|ệ|ể|ễ/g, "e");
             str = str.replace(/ì|í|ị|ỉ|ĩ/g, "i");
             str = str.replace(/ò|ó|ọ|ỏ|õ|ô|ồ|ố|ộ|ổ|ỗ|ơ|ờ|ớ|ợ|ở|ỡ/g, "o");
             str = str.replace(/ú|ù|ụ|ủ|ũ|ư|ừ|ứ|ự|ử|ữ/g, "u");
             str = str.replace(/ỳ|ý|ỵ|ỷ|ỹ/g, "y");
             str = str.replace(/đ/g, "d");
             str = str.replace(/!|@|%|\^|\*|\(|\)|\+|\=|\<|\>|\?|\/|,|\.|\:|\;|\'| |\"|\&|\#|\[|\]|~|$|_/g, "");
             /* tìm và thay thế các kí tự đặc biệt trong chuỗi sang kí tự - */
             str = str.replace(/-+-/g, ""); //thay thế 2- thành 1- 
             str = str.replace(/^\-+|\-+$/g, "");
             //cắt bỏ ký tự - ở đầu và cuối chuỗi  
             return str;
         }  

</script>
    </div>
    </form>       


</body></html>